package com.ease.map.events {
    import com.ease.map.feature.Feature;
    import com.ease.map.geometry.basetype.Location;

    import flash.events.Event;
    import com.ease.map.events.EventBase;

    /**
     *绘制draw相关的事件
     * */
    public class DrawEvent extends EventBase {
        /**
         * 正在绘制的设施
         * */
        private var _drawFeature:Feature;

        private var _newPoint:Location;
        public static const ENABLED:String = "pkmap.drawing.enabled";

        /**
         *起始点，有外围发事件通知平台起始点
         */
        public static const DRAW_START_POINT:String = "pkmap.drawing.drawstart.point";
        /**
         *终止点，
         */
        public static const DRAW_END_POINT:String = "pkmap.drawing.drawend.point";
        /**
         * draw end
         * */
//        public static const DRAW_FEATURE_END:String = "pkmap.drawing.drawend";
        /**
         * draw point feature end
         * */
        public static const DRAW_POINT_FEATURE_END:String = "pkmap.drawing.pointfeature.drawend";
        /**
         * draw line feature end
         * */
        public static const DRAW_LINE_FEATURE_END:String = "pkmap.drawing.linefeature.drawend";
        /**
         * draw polygon feature end
         * */
        public static const DRAW_POLYGON_FEATURE_END:String = "pkmap.drawing.polygonfeature.drawend";

        public static const DRAW_NEW_POINT:String = "pkmap.drawing.drawnewpoint";

        public static const DRAW_POINT_MOUSEMOVING:String = "pkmap.drawing.mousemoving";

        public function DrawEvent(type:String, feature:Feature = null, location:Location = null, bubbles:Boolean = false, cancelable:Boolean = false) {
            super(type, bubbles, cancelable);
            this._drawFeature = feature;
            this._newPoint = location;
        }

        public function get drawFeature():Feature {
            return this._drawFeature;
        }

        public function get newPoint():Location {
            return this._newPoint;
        }

        override public function clone():Event {
            return this;
        }


    }
}

